Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Incremental fmatrix #716

Merged
merged 26 commits into from
Jul 1, 2021
Merged

Incremental fmatrix #716

merged 26 commits into from
Jul 1, 2021

Conversation

JensWehner
Copy link
Member

for the 4c case the Fock matrix can be build incrementally, e.g. only elements are updated for which the density really changed.

@JensWehner JensWehner marked this pull request as draft June 18, 2021 12:49
@codecov
Copy link

codecov bot commented Jun 18, 2021

Codecov Report

Merging #716 (769095e) into master (fee236c) will increase coverage by 0.0%.
The diff coverage is 89.4%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #716   +/-   ##
======================================
  Coverage    51.3%   51.4%           
======================================
  Files         292     293    +1     
  Lines       27178   27235   +57     
======================================
+ Hits        13958   14012   +54     
- Misses      13220   13223    +3     
Impacted Files Coverage Δ
include/votca/xtp/dftengine.h 100.0% <ø> (ø)
src/libxtp/qmpackage.cc 23.2% <ø> (ø)
src/libxtp/qmpackages/xtpdft.cc 0.0% <ø> (ø)
src/libxtp/dftengine/dftengine.cc 71.9% <80.0%> (+0.4%) ⬆️
include/votca/xtp/IncrementalFockBuilder.h 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fee236c...769095e. Read the comment docs.

@JensWehner
Copy link
Member Author

@votca-bot changelog: added incremental Fokc matrix building

@JensWehner JensWehner marked this pull request as ready for review June 28, 2021 13:35
@JensWehner
Copy link
Member Author

@votca-bot format

@JensWehner
Copy link
Member Author

@votca-bot format

@JensWehner
Copy link
Member Author

@votca-bot format

@JensWehner
Copy link
Member Author

@votca-bot format

@JensWehner
Copy link
Member Author

@votca-bot format

@JensWehner
Copy link
Member Author

@votca-bot format

@JensWehner
Copy link
Member Author

@rubengerritsen pls review.

CHANGELOG.rst Outdated Show resolved Hide resolved
Comment on lines +44 to +53
if (!incremental_Fbuild_started_ &&
DiisError < start_incremental_F_threshold_) {
incremental_Fbuild_started_ = true;
reset_incremental_fock_formation_ = false;
last_reset_iteration_ = iteration - 1;
next_reset_threshold_ = DiisError / 10.0;
XTP_LOG(Log::error, log_)
<< TimeStamp() << " Using incremental 4c build from here"
<< std::flush;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this if have an else with an error something like "already started"? Or can we do without the if?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now see how you use it in the loop, but I don't understand the logic now, it seems that as soon as you have called Start incremental_Fbuild_started will be true and will not be turned to false again? In that case this function block only executes once, so why not call it once?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we want to start it in the middle of the iterations, when the threshold is reached and not before we start the SCF. So each SCF cycle before it starts it has to be checked if it should start.

@JensWehner JensWehner enabled auto-merge June 30, 2021 19:29
@JensWehner JensWehner merged commit efc86db into master Jul 1, 2021
@JensWehner JensWehner deleted the incremental_fmatrix branch July 1, 2021 09:44
votca-bot added a commit to votca/votca that referenced this pull request Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants